﻿'Imports System.ComponentModel.Design
'Imports System.ComponentModel
'Imports System.Runtime.InteropServices


'Public Class ReportTranslatable
'    Inherits DevExpress.XtraReports.UI.XtraReport


'    Public Overrides Property Site As System.ComponentModel.ISite
'        Get
'            Return MyBase.Site
'        End Get
'        Set(value As System.ComponentModel.ISite)
'            MyBase.Site = value
'            AddNlsComponentIfNotPreset()
'        End Set
'    End Property

'    Private Sub AddNlsComponentIfNotPreset()
'        If Me.Site Is Nothing OrElse Not Me.Site.DesignMode Then Exit Sub
'        Dim dh = CType(GetService(GetType(IDesignerHost)), IDesignerHost)
'        If dh Is Nothing Then Exit Sub
'        AddHandler dh.LoadComplete, AddressOf VSDesignerLoaded
'    End Sub

'    Private Sub VSDesignerLoaded(s As Object, e As EventArgs)
'        Dim dh = CType(s, IDesignerHost)
'        RemoveHandler dh.LoadComplete, AddressOf VSDesignerLoaded
'        For Each comp As Component In dh.Container.Components
'            If comp.GetType() Is GetType(NlsComponent) Then
'                Exit Sub
'            End If
'        Next
'        dh.Container.Add(New NlsComponent(), "_NlsComponent")
'    End Sub
'End Class
